package com.example.boot_mq_produce.com.mmall;

import org.apache.activemq.command.ActiveMQQueue;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import javax.jms.Queue;


/**
 * @ClassName ConfigBean
 * @Description TODO
 * @Author wushaopei
 * @Date 2019/12/25 14:35
 * @Version 1.0
 */
@Component
public class ConfigBean {

    @Value("${myqueue}")
    private  String  myQueue;

    @Bean
    public Queue queue(){
        return new ActiveMQQueue(myQueue);
    }
}
